Shown in the figure are three smart contracts for the transport chaincode and

four smart contracts for the insurance chaincode. Revealed in these chaincodes

are the key aspects of the business process related to transport and insurance.

Related to a business process is a domain-specific program that is a smart

contract, and a chaincode is a container of a group of technically related smart

contracts.

Ledger

The history of all transactions in a blockchain is recorded immutably, the states

in a ledger are updated, and its transactions are recorded in the world state

holding a cache of these states current values. A smart contract requires to

access these values of an obj ect programmatically, and they are two separate

pieces of the ledger.

The put, get and delete states are used in the world state by smart contracts to

query the blockchain record of transactions where a get is used to retrieve

information about the current state of a business obj ect, in the ledger world

state for the creation or modification of a new business obj ect by an existing

one is done by put, and delete is used to remove a business obj ect from the

current state of the ledger but not its history. The transactions, whether they

create, read, update, or delete business obj ects in the world state for which

several APIs are available in the smart contracts, all of the changes are

recorded immutably in the blockchain.

Application development

The focus of application development is smart contracts, and a single

chaincode can contain the definition of one or more smart contracts. Only the

administrators need to worry about the chaincode; others can think in terms of

smart contracts as a chaincode makes available to the organization in the

network all of its smart contracts when deployed to a network.

A smart contract consists of a set of transaction definitions. A new tatawagon

is created by tataw agon.js in the following example, which is a smart

contract transaction:

asynccreateTataWagon(ctx,tatawagonNo,tmake,tmodel,tcolor,towner){

const tatawagon={

tcolor,

docType:'tatawagon',